Repository navigation
fix(agc): do not use fragment barycentric on MoltenVK - #1653
Merged
oneandonlydean merged 1 commit intoOct 10, 2026
Merged
Conversation
MoltenVK reports VK_KHR_fragment_shader_barycentric, but its SPIR-V to MSL step rejects the PerVertexKHR decoration that the barycentric path uses, so every pixel shader on that path fails to compile into a pipeline. Treat the feature as unavailable when the driver is MoltenVK, so the no-barycentric path is used. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Open
utkuhalis
added a commit
to AnyTogether/AnyPS5-ARM
that referenced
this pull request
Oct 9, 2026
… MoltenVK Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
No title was run. 🤖 Addressed by Claude Code |
9 tasks done
oneandonlydean
added a commit
to oneandonlydean/AnyPS5
that referenced
this pull request
Oct 10, 2026
oneandonlydean
added a commit
to oneandonlydean/AnyPS5
that referenced
this pull request
Oct 10, 2026
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
SleglJan
pushed a commit
to SleglJan/AnyPS5
that referenced
this pull request
Oct 10, 2026
…rycentric fix(agc): do not use fragment barycentric on MoltenVK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
MoltenVK reports
VK_KHR_fragment_shader_barycentric, but its SPIR-V to MSL step rejects thePerVertexKHRdecoration that the barycentric path of the translator uses ("SPIR-V to MSL conversion error: PerVertexKHR decoration is not supported in MSL"). Every pixel shader on that path then fails withVK_ERROR_INITIALIZATION_FAILED("Fragment shader function could not be compiled into pipeline"), and the draw is skipped.The feature is now treated as unavailable when the driver is MoltenVK (
VK_KHR_driver_properties,VK_DRIVER_ID_MOLTENVK), so the existing no-barycentric path is used. The rule isFragmentShaderBarycentricUsable, a small header likeSubgroupClock, so it has a unit test that needs no GPU.Related: #1547 improves the no-barycentric path that MoltenVK now uses. On
maintoday that path does not write the I/J VGPRs, so a shader that reads them for anything other than a plainv_interp_p1/p2pair gets 0. Both PRs changeVulkanDevice.cppnear the same lines; whichever lands second needs a small rebase.Tested
agc_fragment_barycentric(7 cases: MoltenVK reported or not, RADV, NVIDIA and AMD proprietary, Intel): passes, and the MoltenVK case fails when the rule is removed.VulkanDevice.cppcompiles on this branch.maindoes not build libc on macOS yet, so I could not run the full suite here.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code